package com.gohi.main.store.hbm.jdbcMapper;



import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.gohi.main.store.hbm.ShopgooGroupbuy;
import com.gohi.main.store.hbm.ShopgooStore;
import com.gohi.main.store.hbm.ShopgooStoreClass;
import com.gohi.main.util.global.GloblConfig;
/**
 * 根据技师的ID 查询服务
 * @author Administrator
 *
 */
public class GroupByBeautMapper implements RowMapper  {

	@Override
	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		// TODO Auto-generated method stub
		ShopgooGroupbuy s =new ShopgooGroupbuy();

		s.setGroup_id(rs.getInt("group_id"));//主键ID
		s.setBuyer_count(rs.getInt("buyer_count"));//销售数量
		s.setBuyer_num(rs.getInt("buyer_num"));
		s.setGroup_name(rs.getString("group_name")); 
		s.setGroup_pic(rs.getString("group_pic"));//图片
		s.setStore_name(rs.getString("store_name"));
		s.setGroup_price(rs.getString("baojia"));//改成价格

		s.setGroup_intro(rs.getString("group_intro"));
		s.setStore_id(rs.getInt("store_id"));
		s.setOriginal_price(rs.getString("original_price"));
		
		String sp []= s.getGroup_pic().split(",");
		if(sp.length>0){
			s.setGroup_pic(GloblConfig.IMG_ITEMS+sp[0]);
		}else{
			s.setGroup_pic(GloblConfig.IMG_ITEMS+s.getGroup_pic());
		}
		//System.err.println(s.getGroup_pic());
		//s.setDescription(rs.getString("description"));//描述信息
		return s;
	}




	
}
